#include <stdio.h>

void sort(int *, int);
void pointerswap(int* m, int* n);

int main()
{
    int list[6] = {2, 3, 5, 4, 8, 7};
    sort(list, 6);
    for(int i = 0; i< 6; i++)printf("%d ", list[i]);
    putchar('\n');
    return 0;
}

void sort(int *list, int n)
{
    int mid = 0;
    for(int i = 0; i < n; i++)
    {
        for(int j = 0; j<n-i-1; j++)
        {
            if(list[j] < list[j+1])pointerswap(list + j, list + j + 1);
        }
    }
}

void pointerswap(int* m, int* n)
{
    int middle = *m;
    *m = *n;
    *n = middle;
}